home *** CD-ROM | disk | FTP | other *** search
/ Nejlepší hry / Nejlepsi hry.iso / hry / sea of chaos / sea_install.msi / _15C39AAA7726369D39812BD40F01CF6A / _348F55ACAC824D44A018BAC3FD2666F2 < prev    next >
Text File  |  2004-11-13  |  471b  |  24 lines

  1. //simple shader to clip any pixels with a Z coordinate below the water plane
  2. //doesn't do any shading, just texture sampling
  3. //must be used with clipZ.vsh
  4. //Luke Lenhart
  5. //(C)2004-2005 Digipen Institute of Technology
  6.  
  7. //base texture
  8. sampler2D sampTex;
  9.  
  10. //shader input
  11. struct PS_INPUT
  12. {
  13.     float4 Pos : TEXCOORD1;
  14.     float2 Tex0 : TEXCOORD0;
  15. };
  16.  
  17. //shader
  18. float4 PShader(PS_INPUT In) : COLOR
  19. {
  20.     clip(In.Pos.z);
  21.     
  22.     return tex2D(sampTex,In.Tex0);
  23. };
  24.